.class public Lcom/kuguo/ad/s;
.super Landroid/widget/ImageView;


# static fields
.field private static g:Landroid/view/WindowManager;

.field private static j:I

.field private static k:I

.field private static m:Lcom/kuguo/ad/s;

.field private static n:Lcom/kuguo/ad/s;

.field private static q:Landroid/content/Context;


# instance fields
.field private a:F

.field private b:F

.field private c:F

.field private d:F

.field private e:F

.field private f:F

.field private h:I

.field private i:I

.field private l:Lcom/kuguo/ad/j;

.field private o:Landroid/view/WindowManager$LayoutParams;

.field private p:I


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const/4 v0, 0x0

    sput-object v0, Lcom/kuguo/ad/s;->g:Landroid/view/WindowManager;

    const/4 v0, 0x1

    sput v0, Lcom/kuguo/ad/s;->j:I

    const/4 v0, 0x0

    sput v0, Lcom/kuguo/ad/s;->k:I

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;I)V
    .locals 7

    const/16 v1, 0x48

    const/high16 v6, 0x3fc0

    const/4 v5, 0x0

    invoke-direct {p0, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    iput v5, p0, Lcom/kuguo/ad/s;->h:I

    const/4 v0, 0x0

    iput-object v0, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    sget-object v0, Lcom/kuguo/ad/s;->g:Landroid/view/WindowManager;

    invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v0

    invoke-virtual {v0}, Landroid/view/Display;->getWidth()I

    move-result v0

    iput v0, p0, Lcom/kuguo/ad/s;->h:I

    iput p2, p0, Lcom/kuguo/ad/s;->i:I

    new-instance v0, Landroid/view/WindowManager$LayoutParams;

    invoke-direct {v0}, Landroid/view/WindowManager$LayoutParams;-><init>()V

    iput-object v0, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    sget v0, Lcom/kuguo/ad/s;->j:I

    if-ne p2, v0, :cond_1

    sget-object v0, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    const-string v1, "kuguo_res/kuguo_top.png"

    invoke-static {v0, v1}, Lcom/kuguo/c/d;->a(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v0

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v1

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v2

    invoke-virtual {p0, v0}, Lcom/kuguo/ad/s;->setImageBitmap(Landroid/graphics/Bitmap;)V

    move v0, v2

    :goto_0
    iget-object v2, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    const/16 v3, 0x7d2

    iput v3, v2, Landroid/view/WindowManager$LayoutParams;->type:I

    iget-object v2, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    const/4 v3, 0x1

    iput v3, v2, Landroid/view/WindowManager$LayoutParams;->format:I

    iget-object v2, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    const/16 v3, 0x28

    iput v3, v2, Landroid/view/WindowManager$LayoutParams;->flags:I

    iget-object v2, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    const/16 v3, 0x33

    iput v3, v2, Landroid/view/WindowManager$LayoutParams;->gravity:I

    sget-object v2, Lcom/kuguo/ad/s;->g:Landroid/view/WindowManager;

    invoke-interface {v2}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v2

    invoke-virtual {v2}, Landroid/view/Display;->getWidth()I

    move-result v2

    sget-object v3, Lcom/kuguo/ad/s;->g:Landroid/view/WindowManager;

    invoke-interface {v3}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v3

    invoke-virtual {v3}, Landroid/view/Display;->getHeight()I

    move-result v3

    sget v4, Lcom/kuguo/ad/s;->j:I

    if-ne p2, v4, :cond_2

    iget-object v4, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    iput v2, v4, Landroid/view/WindowManager$LayoutParams;->x:I

    iget-object v2, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    div-int/lit8 v3, v3, 0x9

    iput v3, v2, Landroid/view/WindowManager$LayoutParams;->y:I

    :cond_0
    :goto_1
    iget-object v2, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    sget-object v3, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    int-to-float v1, v1

    div-float/2addr v1, v6

    float-to-int v1, v1

    invoke-static {v3, v1}, Lcom/kuguo/ad/a;->a(Landroid/content/Context;I)I

    move-result v1

    iput v1, v2, Landroid/view/WindowManager$LayoutParams;->width:I

    iget-object v1, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    sget-object v2, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    int-to-float v0, v0

    div-float/2addr v0, v6

    float-to-int v0, v0

    invoke-static {v2, v0}, Lcom/kuguo/ad/a;->a(Landroid/content/Context;I)I

    move-result v0

    iput v0, v1, Landroid/view/WindowManager$LayoutParams;->height:I

    :try_start_0
    const-string v0, "com.android.internal.R$dimen"

    invoke-static {v0}, Ljava/lang/Class;->forName(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;

    move-result-object v1

    const-string v2, "status_bar_height"

    invoke-virtual {v0, v2}, Ljava/lang/Class;->getField(Ljava/lang/String;)Ljava/lang/reflect/Field;

    move-result-object v0

    invoke-virtual {v0, v1}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v0

    sget-object v1, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;

    move-result-object v1

    invoke-virtual {v1, v0}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

    move-result v0

    iput v0, p0, Lcom/kuguo/ad/s;->p:I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_2
    sget-object v0, Lcom/kuguo/ad/s;->g:Landroid/view/WindowManager;

    iget-object v1, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    invoke-interface {v0, p0, v1}, Landroid/view/WindowManager;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    return-void

    :cond_1
    sget v0, Lcom/kuguo/ad/s;->k:I

    if-ne p2, v0, :cond_3

    sget-object v0, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    const-string v1, "kuguo_res/kuguo_side.png"

    invoke-static {v0, v1}, Lcom/kuguo/c/d;->a(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v0

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v1

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v2

    invoke-virtual {p0, v0}, Lcom/kuguo/ad/s;->setImageBitmap(Landroid/graphics/Bitmap;)V

    move v0, v2

    goto/16 :goto_0

    :cond_2
    sget v2, Lcom/kuguo/ad/s;->k:I

    if-ne p2, v2, :cond_0

    iget-object v2, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    iput v5, v2, Landroid/view/WindowManager$LayoutParams;->x:I

    iget-object v2, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    div-int/lit8 v3, v3, 0x2

    iput v3, v2, Landroid/view/WindowManager$LayoutParams;->y:I

    goto :goto_1

    :catch_0
    move-exception v0

    iput v5, p0, Lcom/kuguo/ad/s;->p:I

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_2

    :cond_3
    move v0, v1

    goto/16 :goto_0
.end method

.method public static a(Landroid/content/Context;I)Lcom/kuguo/ad/s;
    .locals 2

    sput-object p0, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    sget-object v0, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    invoke-virtual {v0}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;

    move-result-object v0

    const-string v1, "window"

    invoke-virtual {v0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Landroid/view/WindowManager;

    sput-object v0, Lcom/kuguo/ad/s;->g:Landroid/view/WindowManager;

    :try_start_0
    sget v0, Lcom/kuguo/ad/s;->j:I

    if-ne p1, v0, :cond_0

    sget-object v0, Lcom/kuguo/ad/s;->m:Lcom/kuguo/ad/s;

    if-eqz v0, :cond_0

    sget-object v0, Lcom/kuguo/ad/s;->g:Landroid/view/WindowManager;

    sget-object v1, Lcom/kuguo/ad/s;->m:Lcom/kuguo/ad/s;

    invoke-interface {v0, v1}, Landroid/view/WindowManager;->removeView(Landroid/view/View;)V

    :cond_0
    sget v0, Lcom/kuguo/ad/s;->k:I

    if-ne p1, v0, :cond_1

    sget-object v0, Lcom/kuguo/ad/s;->n:Lcom/kuguo/ad/s;

    if-eqz v0, :cond_1

    sget-object v0, Lcom/kuguo/ad/s;->g:Landroid/view/WindowManager;

    sget-object v1, Lcom/kuguo/ad/s;->n:Lcom/kuguo/ad/s;

    invoke-interface {v0, v1}, Landroid/view/WindowManager;->removeView(Landroid/view/View;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :cond_1
    :goto_0
    sget v0, Lcom/kuguo/ad/s;->j:I

    if-ne p1, v0, :cond_2

    new-instance v0, Lcom/kuguo/ad/s;

    invoke-direct {v0, p0, p1}, Lcom/kuguo/ad/s;-><init>(Landroid/content/Context;I)V

    sput-object v0, Lcom/kuguo/ad/s;->m:Lcom/kuguo/ad/s;

    sget-object v0, Lcom/kuguo/ad/s;->m:Lcom/kuguo/ad/s;

    :goto_1
    return-object v0

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0

    :cond_2
    sget v0, Lcom/kuguo/ad/s;->k:I

    if-ne p1, v0, :cond_3

    new-instance v0, Lcom/kuguo/ad/s;

    invoke-direct {v0, p0, p1}, Lcom/kuguo/ad/s;-><init>(Landroid/content/Context;I)V

    sput-object v0, Lcom/kuguo/ad/s;->n:Lcom/kuguo/ad/s;

    sget-object v0, Lcom/kuguo/ad/s;->n:Lcom/kuguo/ad/s;

    goto :goto_1

    :cond_3
    const/4 v0, 0x0

    goto :goto_1
.end method

.method private a()V
    .locals 4

    const/4 v3, 0x1

    const-string v0, "android__log"

    const-string v1, "sprite be clicked !!!!!!!!!! "

    invoke-static {v0, v1}, Lcom/kuguo/c/a;->a(Ljava/lang/String;Ljava/lang/Object;)V

    iget-object v0, p0, Lcom/kuguo/ad/s;->l:Lcom/kuguo/ad/j;

    if-eqz v0, :cond_1

    iget-object v0, p0, Lcom/kuguo/ad/s;->l:Lcom/kuguo/ad/j;

    invoke-interface {v0}, Lcom/kuguo/ad/j;->a()V

    :cond_0
    :goto_0
    return-void

    :cond_1
    invoke-static {}, Lcom/kuguo/ad/BoutiqueActivity;->a()Landroid/app/Activity;

    move-result-object v0

    if-eqz v0, :cond_2

    invoke-virtual {v0}, Landroid/app/Activity;->finish()V

    goto :goto_0

    :cond_2
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    sget-object v1, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    const-class v2, Lcom/kuguo/ad/BoutiqueActivity;

    invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;

    const/high16 v1, 0x1000

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    sget-object v1, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    invoke-virtual {v1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    sget-object v0, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    invoke-static {v0}, Lcom/kuguo/ad/a;->k(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_0

    iget v0, p0, Lcom/kuguo/ad/s;->i:I

    sget v1, Lcom/kuguo/ad/s;->j:I

    if-ne v0, v1, :cond_3

    sget-object v0, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    invoke-static {v0}, Lcom/kuguo/ad/a;->k(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v0

    const/16 v1, -0xb

    invoke-static {v0, v1, v3}, Lcom/kuguo/ad/a;->a(Ljava/lang/String;II)Z

    goto :goto_0

    :cond_3
    iget v0, p0, Lcom/kuguo/ad/s;->i:I

    sget v1, Lcom/kuguo/ad/s;->k:I

    if-ne v0, v1, :cond_0

    sget-object v0, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    invoke-static {v0}, Lcom/kuguo/ad/a;->k(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v0

    const/16 v1, -0xc

    invoke-static {v0, v1, v3}, Lcom/kuguo/ad/a;->a(Ljava/lang/String;II)Z

    goto :goto_0
.end method

.method private b()V
    .locals 3

    iget-object v0, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    iget v1, p0, Lcom/kuguo/ad/s;->c:F

    iget v2, p0, Lcom/kuguo/ad/s;->a:F

    sub-float/2addr v1, v2

    float-to-int v1, v1

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->x:I

    iget-object v0, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    iget v1, p0, Lcom/kuguo/ad/s;->d:F

    iget v2, p0, Lcom/kuguo/ad/s;->b:F

    sub-float/2addr v1, v2

    float-to-int v1, v1

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->y:I

    :try_start_0
    sget-object v0, Lcom/kuguo/ad/s;->g:Landroid/view/WindowManager;

    iget-object v1, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    invoke-interface {v0, p0, v1}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method private c()V
    .locals 5

    const/high16 v4, 0x3fc0

    sget-object v0, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    const-string v1, "kuguo_res/kuguo.png"

    invoke-static {v0, v1}, Lcom/kuguo/c/d;->a(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/kuguo/ad/s;->setImageBitmap(Landroid/graphics/Bitmap;)V

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v1

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v0

    iget-object v2, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    sget-object v3, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    int-to-float v1, v1

    div-float/2addr v1, v4

    float-to-int v1, v1

    invoke-static {v3, v1}, Lcom/kuguo/ad/a;->a(Landroid/content/Context;I)I

    move-result v1

    iput v1, v2, Landroid/view/WindowManager$LayoutParams;->width:I

    iget-object v1, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    sget-object v2, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    int-to-float v0, v0

    div-float/2addr v0, v4

    float-to-int v0, v0

    invoke-static {v2, v0}, Lcom/kuguo/ad/a;->a(Landroid/content/Context;I)I

    move-result v0

    iput v0, v1, Landroid/view/WindowManager$LayoutParams;->height:I

    :try_start_0
    sget-object v0, Lcom/kuguo/ad/s;->g:Landroid/view/WindowManager;

    iget-object v1, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    invoke-interface {v0, p0, v1}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method private d()V
    .locals 5

    const/high16 v4, 0x3fc0

    sget-object v0, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    const-string v1, "kuguo_res/kuguo_top_pressed.png"

    invoke-static {v0, v1}, Lcom/kuguo/c/d;->a(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/kuguo/ad/s;->setImageBitmap(Landroid/graphics/Bitmap;)V

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v1

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v0

    iget-object v2, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    sget-object v3, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    int-to-float v1, v1

    div-float/2addr v1, v4

    float-to-int v1, v1

    invoke-static {v3, v1}, Lcom/kuguo/ad/a;->a(Landroid/content/Context;I)I

    move-result v1

    iput v1, v2, Landroid/view/WindowManager$LayoutParams;->width:I

    iget-object v1, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    sget-object v2, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    int-to-float v0, v0

    div-float/2addr v0, v4

    float-to-int v0, v0

    invoke-static {v2, v0}, Lcom/kuguo/ad/a;->a(Landroid/content/Context;I)I

    move-result v0

    iput v0, v1, Landroid/view/WindowManager$LayoutParams;->height:I

    :try_start_0
    sget-object v0, Lcom/kuguo/ad/s;->g:Landroid/view/WindowManager;

    iget-object v1, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    invoke-interface {v0, p0, v1}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method private e()V
    .locals 5

    const/high16 v4, 0x3fc0

    sget-object v0, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    const-string v1, "kuguo_res/kuguo_side2.png"

    invoke-static {v0, v1}, Lcom/kuguo/c/d;->a(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/kuguo/ad/s;->setImageBitmap(Landroid/graphics/Bitmap;)V

    invoke-virtual {p0, v0}, Lcom/kuguo/ad/s;->setImageBitmap(Landroid/graphics/Bitmap;)V

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v1

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v0

    iget-object v2, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    sget-object v3, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    int-to-float v1, v1

    div-float/2addr v1, v4

    float-to-int v1, v1

    invoke-static {v3, v1}, Lcom/kuguo/ad/a;->a(Landroid/content/Context;I)I

    move-result v1

    iput v1, v2, Landroid/view/WindowManager$LayoutParams;->width:I

    iget-object v1, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    sget-object v2, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    int-to-float v0, v0

    div-float/2addr v0, v4

    float-to-int v0, v0

    invoke-static {v2, v0}, Lcom/kuguo/ad/a;->a(Landroid/content/Context;I)I

    move-result v0

    iput v0, v1, Landroid/view/WindowManager$LayoutParams;->height:I

    :try_start_0
    sget-object v0, Lcom/kuguo/ad/s;->g:Landroid/view/WindowManager;

    iget-object v1, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    invoke-interface {v0, p0, v1}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method private f()V
    .locals 5

    const/high16 v4, 0x3fc0

    sget-object v0, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    const-string v1, "kuguo_res/kuguo_side.png"

    invoke-static {v0, v1}, Lcom/kuguo/c/d;->a(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/kuguo/ad/s;->setImageBitmap(Landroid/graphics/Bitmap;)V

    invoke-virtual {p0, v0}, Lcom/kuguo/ad/s;->setImageBitmap(Landroid/graphics/Bitmap;)V

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v1

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v0

    iget-object v2, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    sget-object v3, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    int-to-float v1, v1

    div-float/2addr v1, v4

    float-to-int v1, v1

    invoke-static {v3, v1}, Lcom/kuguo/ad/a;->a(Landroid/content/Context;I)I

    move-result v1

    iput v1, v2, Landroid/view/WindowManager$LayoutParams;->width:I

    iget-object v1, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    sget-object v2, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    int-to-float v0, v0

    div-float/2addr v0, v4

    float-to-int v0, v0

    invoke-static {v2, v0}, Lcom/kuguo/ad/a;->a(Landroid/content/Context;I)I

    move-result v0

    iput v0, v1, Landroid/view/WindowManager$LayoutParams;->height:I

    :try_start_0
    sget-object v0, Lcom/kuguo/ad/s;->g:Landroid/view/WindowManager;

    iget-object v1, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    invoke-interface {v0, p0, v1}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method

.method private g()V
    .locals 5

    const/high16 v4, 0x3fc0

    sget-object v0, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    const-string v1, "kuguo_res/kuguo_top.png"

    invoke-static {v0, v1}, Lcom/kuguo/c/d;->a(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/kuguo/ad/s;->setImageBitmap(Landroid/graphics/Bitmap;)V

    invoke-virtual {p0, v0}, Lcom/kuguo/ad/s;->setImageBitmap(Landroid/graphics/Bitmap;)V

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v1

    invoke-virtual {v0}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v0

    iget-object v2, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    sget-object v3, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    int-to-float v1, v1

    div-float/2addr v1, v4

    float-to-int v1, v1

    invoke-static {v3, v1}, Lcom/kuguo/ad/a;->a(Landroid/content/Context;I)I

    move-result v1

    iput v1, v2, Landroid/view/WindowManager$LayoutParams;->width:I

    iget-object v1, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    sget-object v2, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    int-to-float v0, v0

    div-float/2addr v0, v4

    float-to-int v0, v0

    invoke-static {v2, v0}, Lcom/kuguo/ad/a;->a(Landroid/content/Context;I)I

    move-result v0

    iput v0, v1, Landroid/view/WindowManager$LayoutParams;->height:I

    :try_start_0
    sget-object v0, Lcom/kuguo/ad/s;->g:Landroid/view/WindowManager;

    iget-object v1, p0, Lcom/kuguo/ad/s;->o:Landroid/view/WindowManager$LayoutParams;

    invoke-interface {v0, p0, v1}, Landroid/view/WindowManager;->updateViewLayout(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    :goto_0
    return-void

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_0
.end method


# virtual methods
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
    .locals 5

    const/4 v4, 0x0

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawX()F

    move-result v0

    iput v0, p0, Lcom/kuguo/ad/s;->c:F

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getRawY()F

    move-result v0

    iget v1, p0, Lcom/kuguo/ad/s;->p:I

    int-to-float v1, v1

    sub-float/2addr v0, v1

    iput v0, p0, Lcom/kuguo/ad/s;->d:F

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getAction()I

    move-result v0

    packed-switch v0, :pswitch_data_0

    :goto_0
    const/4 v0, 0x1

    return v0

    :pswitch_0
    iget v0, p0, Lcom/kuguo/ad/s;->i:I

    sget v1, Lcom/kuguo/ad/s;->k:I

    if-ne v0, v1, :cond_1

    invoke-direct {p0}, Lcom/kuguo/ad/s;->c()V

    :cond_0
    :goto_1
    invoke-virtual {p1}, Landroid/view/MotionEvent;->getX()F

    move-result v0

    iput v0, p0, Lcom/kuguo/ad/s;->a:F

    invoke-virtual {p1}, Landroid/view/MotionEvent;->getY()F

    move-result v0

    iput v0, p0, Lcom/kuguo/ad/s;->b:F

    iget v0, p0, Lcom/kuguo/ad/s;->c:F

    iput v0, p0, Lcom/kuguo/ad/s;->e:F

    iget v0, p0, Lcom/kuguo/ad/s;->d:F

    iput v0, p0, Lcom/kuguo/ad/s;->f:F

    sget-object v0, Lcom/kuguo/ad/s;->g:Landroid/view/WindowManager;

    invoke-interface {v0}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

    move-result-object v0

    invoke-virtual {v0}, Landroid/view/Display;->getWidth()I

    move-result v0

    iput v0, p0, Lcom/kuguo/ad/s;->h:I

    goto :goto_0

    :cond_1
    iget v0, p0, Lcom/kuguo/ad/s;->i:I

    sget v1, Lcom/kuguo/ad/s;->j:I

    if-ne v0, v1, :cond_0

    invoke-direct {p0}, Lcom/kuguo/ad/s;->d()V

    goto :goto_1

    :pswitch_1
    invoke-direct {p0}, Lcom/kuguo/ad/s;->b()V

    goto :goto_0

    :pswitch_2
    iget v0, p0, Lcom/kuguo/ad/s;->i:I

    sget v1, Lcom/kuguo/ad/s;->k:I

    if-ne v0, v1, :cond_5

    iget v0, p0, Lcom/kuguo/ad/s;->c:F

    iget v1, p0, Lcom/kuguo/ad/s;->h:I

    div-int/lit8 v1, v1, 0x2

    int-to-float v1, v1

    cmpl-float v0, v0, v1

    if-lez v0, :cond_4

    iget v0, p0, Lcom/kuguo/ad/s;->h:I

    int-to-float v0, v0

    iput v0, p0, Lcom/kuguo/ad/s;->c:F

    invoke-direct {p0}, Lcom/kuguo/ad/s;->e()V

    :cond_2
    :goto_2
    invoke-direct {p0}, Lcom/kuguo/ad/s;->b()V

    iget v0, p0, Lcom/kuguo/ad/s;->c:F

    iget v1, p0, Lcom/kuguo/ad/s;->e:F

    sub-float/2addr v0, v1

    invoke-static {v0}, Ljava/lang/Math;->abs(F)F

    move-result v0

    iget v1, p0, Lcom/kuguo/ad/s;->d:F

    iget v2, p0, Lcom/kuguo/ad/s;->f:F

    sub-float/2addr v1, v2

    invoke-static {v1}, Ljava/lang/Math;->abs(F)F

    move-result v1

    sget-object v2, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    const/16 v3, 0x28

    invoke-static {v2, v3}, Lcom/kuguo/ad/a;->a(Landroid/content/Context;I)I

    move-result v2

    int-to-float v2, v2

    cmpg-float v0, v0, v2

    if-gez v0, :cond_3

    sget-object v0, Lcom/kuguo/ad/s;->q:Landroid/content/Context;

    const/16 v2, 0xd

    invoke-static {v0, v2}, Lcom/kuguo/ad/a;->a(Landroid/content/Context;I)I

    move-result v0

    int-to-float v0, v0

    cmpg-float v0, v1, v0

    if-gez v0, :cond_3

    invoke-direct {p0}, Lcom/kuguo/ad/s;->a()V

    :cond_3
    iput v4, p0, Lcom/kuguo/ad/s;->b:F

    iput v4, p0, Lcom/kuguo/ad/s;->a:F

    goto/16 :goto_0

    :cond_4
    iput v4, p0, Lcom/kuguo/ad/s;->c:F

    invoke-direct {p0}, Lcom/kuguo/ad/s;->f()V

    goto :goto_2

    :cond_5
    iget v0, p0, Lcom/kuguo/ad/s;->i:I

    sget v1, Lcom/kuguo/ad/s;->j:I

    if-ne v0, v1, :cond_2

    invoke-direct {p0}, Lcom/kuguo/ad/s;->g()V

    goto :goto_2

    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_0
        :pswitch_2
        :pswitch_1
    .end packed-switch
.end method
